package com.xyhuo.leetcode;

public class ParentClazz {

    {
        System.out.println("父类实例代码块");
    }

    static {
        System.out.println("父类静态代码块");
    }

    ParentClazz(){
        System.out.println("父类构造方法");
    }

    public static void main(String[] args) {
        ChildClazz c = new ChildClazz();
    }
}

class ChildClazz extends ParentClazz{
    {
        System.out.println("子类实例代码块");
    }

    static {
        System.out.println("子类静态代码块");
    }

    ChildClazz(){
        System.out.println("子类构造方法");
    }
}
